export default {
  //活动列表
    loadActivityListServer(params, callback) {
        Vue.http.get(  '/activity/listpage.json', { params: params }).then(function(response) {
            callback(response.data);
        });
    },
  //添加活动--省份下拉
  loadProvinceSelectServer(params, callback) {
    Vue.http.get(  '/base/city/list/province.json', { params: params }).then(function(response) {
      callback(response.data);
    });
  },
  //添加活动--城市下拉
  loadCitySelectServer(params, callback) {
    Vue.http.get(  '/base/city/list/child.json', { params: params }).then(function(response) {
      callback(response.data);
    });
  },
  //添加活动
  addActivityServer(params, callback_success, callback_error) {
      Vue.http.post(  '/activity/add.json', params).then(response => {
          callback_success(response.data);
      }, response => {
          callback_error(response.data)
      });
  },
  //活动详情
  loadActivityDetailServer(params, callback) {
    Vue.http.get(  '/activity/detail/'+params.id+'.json',{ params: params }).then((response)=> {
      callback(response.data);

    });
  },
  //活动详情--参与情况
  loadActivityPeopleServer(params, callback) {
    Vue.http.get(  '/activity/enter/people/listpage.json',{ params: params }).then((response)=> {
      callback(response.data);

    });
  },
  // 活动列表中各种操作
  operationActivityServer(params, callback) {
      Vue.http.put(  '/activity/operation.json', params).then(response => {
          callback(response.data);
      });
  },
  //文章列表-- 删除活动
  deleteActivityServer(params, callback) {
    Vue.http.delete(  '/activity/delete.json',  { params: params }).then(response => {
      callback(response.data);
    });
  },
  // 编辑活动
  editActivityServer(params, callback_success, callback_error) {
      Vue.http.put(  '/activity/modify.json', params).then(response => {
          callback_success(response.data);
      }, response => {
          callback_error(response.data)
      });
  },
  //短信通知
  sendMessageServer(params, callback) {
    Vue.http.post(  '/activity/enter/people/send.json', params).then(response => {
      callback(response.data);
    });
  },
}
